package br.com.sigeden.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author David Amom <davidamom@gmail.com>
 */
@Entity
@Table(name="midia", catalog="sigeden")
public class Midia implements java.io.Serializable{
    @Id
    @GeneratedValue(strategy= GenerationType.AUTO)
    @Column(name="id", unique=true, nullable=false)
    private Long id;
    @Column(name="caminho_recurso", length=255)
    private String caminho;
    @ManyToOne(cascade= CascadeType.ALL, fetch = FetchType.LAZY)
    private TipoMidia tipoMidia;
    @ManyToOne(cascade= CascadeType.ALL, fetch = FetchType.LAZY)
    private Denuncia denuncia;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCaminho() {
        return caminho;
    }

    public void setCaminho(String caminho) {
        this.caminho = caminho;
    }

    public TipoMidia getTipoMidia() {
        return tipoMidia;
    }

    public void setTipoMidia(TipoMidia tipoMidia) {
        this.tipoMidia = tipoMidia;
    }

    public Denuncia getDenuncia() {
        return denuncia;
    }

    public void setDenuncia(Denuncia denuncia) {
        this.denuncia = denuncia;
    }
    
    
}
